package com.maxie.factory.simple;


import com.maxie.factory.simple.entity.CNPizza;
import com.maxie.factory.simple.entity.Pizza;
import com.maxie.factory.simple.entity.USAPizza;

public class SimpleFactory {

    public Pizza createPizza(String type)
    {
        if (type == "cn") {
            return new CNPizza();
        } else if (type == "usa") {
            return new USAPizza();
        }
        return null;
    }
}
